fix(tests): Apply more fixes for Windows Integration test flakiness#266
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
InfrastructureVersionPresentWindowsintegration test has been failing on and off. It exercisesInfra/Agent/Version, which reportsInfoonly after calling the GitHub API to check how old the installed agent is. That call is unauthenticated and rate-limited to 60 requests/hour per IP, and the Windows runners share IPs, so the call frequently gets throttled. When it does, the task returnsWarninginstead ofInfoand the test fails. Re-running the same commit passes, which is what pointed to the rate limit rather than a real regression.Fix
Instead of depending on that network call, the test now hands the release date directly to the task via the
-ooverride the CLI already supports. Nothing changes in production: when the override isn't set, the task calls GitHub exactly as before. The date the test passes in is generated from the current date at image-build time, so it always looks recent and won't silently rot into a failure a year out the way a hardcoded date would.The version-age logic is already unit-tested, so this doesn't drop meaningful coverage. The integration test goes back to verifying what it's actually for: that the installed agent binary is found and its version is read end to end.